package com.pxl.springbootinit.controller;

import com.fasterxml.jackson.databind.ser.Serializers;
import com.pxl.springbootinit.common.BaseResponse;
import com.pxl.springbootinit.common.ResultUtils;
import com.pxl.springbootinit.model.dto.item.ItemAuditForm;
import com.pxl.springbootinit.service.ItemAuditService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 物品审核接口
 *
 * @author MADAO
 * @create 2024 - 12 - 21 21:23
 */
@RestController
@RequestMapping("/item/")
public class ItemAuditController {

    @Resource
    private ItemAuditService itemAuditService;

    @PostMapping("/admin/pass")
    public BaseResponse<Boolean> pass(@RequestBody ItemAuditForm itemAuditForm){
        return ResultUtils.success(itemAuditService.pass(itemAuditForm));
    }

    @PostMapping("/admin/reject")
    public BaseResponse<Boolean> reject(@RequestBody ItemAuditForm itemAuditForm){
        return ResultUtils.success(itemAuditService.reject(itemAuditForm));
    }

}
